package entities

import "time"

// TaskStatus 表示任务状态
type TaskStatus string

const (
	TaskPending TaskStatus = "pending"
	TaskRunning TaskStatus = "running"
	TaskSuccess TaskStatus = "success"
	TaskFailed  TaskStatus = "failed"
)

// Task 表示一个异步操作任务
type Task struct {
	ID        string     `json:"id"`
	Type      string     `json:"type"`     // 操作类型，如 start/stop/restart/delete
	TargetID  string     `json:"targetId"` // 容器ID
	Status    TaskStatus `json:"status"`
	Result    string     `json:"result"`
	CreatedAt time.Time  `json:"createdAt"`
	UpdatedAt time.Time  `json:"updatedAt"`
}
